package com.swan.core.utils.id;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.RandomUtil;

import java.util.Date;

/** ID 生成工具
 * @author zongf
 * @date 2024-11-21
 **/
public class IdUtil {

    public static final String generateLogId(){
        String timestamp = DateUtil.format(new Date(),"yyyyMMddHHmmssSSS");
        String randomString = RandomUtil.randomString(12).toUpperCase();
        return String.format("%sZ%s", timestamp, randomString);
    }

}

